<{include file="Common/head"}>
<{include file="Common/menu"}>

<link href="_index_/yy/index.css" rel="stylesheet">
<link href="_index_/yy/laydate.css" rel="stylesheet">
<script src="_index_/yy/laydate.js"></script>
<script type="text/javascript" src="_index_/laydate/laydate.js"></script>

<style type="text/css">
*{font-size: 15px!important;}

    .layui-input{
        width: 100px;
    }
</style>

<section class="Hui-article-box">

    <form class="appointment">
        <ul>
            <{neq name="data.id" value="0"}>
            <li><h2>修改帐号：<{$data['uname']}></h2></li>
            <{/neq}>

            <li>
                <h2>修改密码：</h2>
                <input type="text" autocomplete="off" name="password" class="layui-input password" id="<{$data['id']}>"  placeholder="输入密码">
            </li>

            <li></li>
        </ul>

    </form>
    <div><input class="btn btn-success radius submit" type="button" value="修改" style="margin-left: 40px;"></div>
</section>
<script>

    $(".submit").on("click",function(){
        password     = $(".password").val();        //密码
        id=   $(".password").attr('id')

        var postdata = {
            "password":password,
            'id':id
        };
        console.log(postdata);

        if(password==''){
            alert("密码不能为空");
            return false;
        }


        $.post("/index/Set/updatepass",postdata,function(e){
            console.log(e);
            if(e==1){
                $.Huimodalalert('修改成功',2000);
                window.close();
                setInterval(function(){
                    location.reload();
                },2000)
            }else{

            }
        });
    })
</script>
<{include file="Common/footer"}>